﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace QLSV
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }

        private void them_Click(object sender, EventArgs e)
        {
            //hien panelDB
            panelDB.Enabled = true;
            panelbtn.Enabled = false;
            oksua.Enabled = false;
            okthem.Enabled = true;
        }

        private void sua_Click(object sender, EventArgs e)
        {
            //hien panelDB
            panelDB.Enabled = true;
            panelbtn.Enabled = false;
            okthem.Enabled = false;
            oksua.Enabled = true;


            //dua du lieu tu do`ng dc chon trong GridView len cac textbox
            //....
        }
        private void Refresh()
        {
         //ham nay dung de show tat ca cac sinh vien vao gridview  
        }
        private void Empty()//xoa trong cac text box, an? panelDB
        {
            txtlop.Text = txtmssv.Text = txtten.Text = txtns.Text = "";
            panelbtn.Enabled = true;
            panelDB.Enabled = false;
        }
        private void xoa_Click(object sender, EventArgs e)
        {
            //dat ham xoa vao day (xoa SV duoc chon trong Gridview)
        }

        private void button5_Click(object sender, EventArgs e)
        {
            Close();
        }

        private void okthem_Click(object sender, EventArgs e)
        {
            //dat ham them SV vao day
        }

        private void oksua_Click(object sender, EventArgs e)
        {
            //dat ham sua SV vao day
        }

        private void cancel_Click(object sender, EventArgs e)
        {
            Empty();
        }

        private void Form1_Load(object sender, EventArgs e)
        {
            Refresh();
            panelDB.Enabled = false;
        }

    }
}
